﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Ext.Net;
using ExaminationSys.DataAccess;
using ExaminationSys.DataAccess.Repository;
using ExaminationSys.Helper;
using ExaminationSys.DataAccess.Entity;


namespace ExaminationSys.View.Section
{
    public partial class SectionInformationEdit : System.Web.UI.Page
    {

        private static readonly SectionInformationService ProxySectionInformation = ObjectFactory<SectionInformationService>.Create();
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                hidSectionID.Value = Request.QueryString["SectionID"].ToString();
                hidSubitem.Value = Request.QueryString["Subitem"].ToString();

                SectionInformation sectioninfomaintion = ProxySectionInformation.GetBySectionId(new Guid(hidSectionID.Value));
                if (sectioninfomaintion != null)
                {
                    HidId.Value = sectioninfomaintion.ID.ToString();
                    hidContent.Value = sectioninfomaintion.Content;
                }
                else
                {
                    hidContent.Value = "";
                    HidId.Value = "";
                }
                
                  
            }
        }

        protected void SaveSectionInfo(object sender, DirectEventArgs e)
        {

            Response.Close();
        }

        protected void btnSave_Click(object sender, EventArgs e)
        {
             Response.Close();
        }

        protected void btnCancel_Click(object sender, EventArgs e)
        {

            Response.Close();
        }
    }
}